
var api = require('../../utils/api.js');
var app = getApp();
Page({
    data: {
        tophe:0
    },
    currentPageNumber: 1,
        onLoad() {
        var file=api.FIlE;
        this.setData({
            bg:file
        })
       
    },

    back(){
        wx.navigateBack()
    },
    onShow() {
        let jn = wx.getMenuButtonBoundingClientRect();

        console.log(jn);
        var tophe=jn.top+jn.height+15;
        this.setData({
            tophe:tophe+'px',
            over:jn.top
        })

        this.getallzixun();
     
    },

    getallzixun(){

        var that=this;
        api.post({
            url: 'zixun/getallzixun',
            data: {},
            success: data => {
                that.setData({
                    zixun:data.data
                })
            },
        });


    },

    // 跳转到详情页
    gotoDetail(e) {
        const id = e.currentTarget.dataset.id;
        wx.navigateTo({
            url: '/pages/zixun/info?id=' + id
        });
    }


});